

import React, { useEffect } from 'react'
import { Comment, Avatar } from 'antd';
import { inject, observer } from 'mobx-react';
import { ajax } from '../../api';
import { baseURL } from '../../api/request';
import { UserOutlined } from '@ant-design/icons';

function OpinionList({ user, opinion }: any) {
    const { userInfo, changeUserInfo }: any = user
    const {
        opinionlist,
        changeOpinionlist,
        asyncGetOpinionlist,
        backopinionlist,
        changeBackopinionlist,
        asyncGetbackopinionlist
    }: any = opinion
    useEffect(() => {
        asyncGetOpinionlist()
        asyncGetbackopinionlist()
    }, [])
    console.log(opinionlist)
    return (
        <div>
            <Comment
                actions={[<span key="comment-nested-reply-to">回复</span>]}
                // author={<a>{result.username}</a>}
                // avatar={<Avatar src={userInfo.avatar?.replace(/public/, baseURL)} icon={<UserOutlined />} alt={result.username} />}
                content={<p>{111}</p>}
            >
            </Comment>
        </div>
    )
}

export default inject("user", "opinion")(observer(OpinionList))